package com.caopeng.javaee.service.ServiceImpl;

import com.caopeng.javaee.dao.StudentJpa;
import com.caopeng.javaee.entity.student;
import com.caopeng.javaee.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * @program: javaee
 * @description: 学生实现类
 * @author: caopeng
 * @create: 2018-12-10 10:30
 **/
@Service
public class StudentServiceImpl implements StudentService{
    @Autowired
    private StudentJpa studentjpa;
    @Override
    public student SfindByAccountAndName(String account, String name) {
        return studentjpa.findByAccountAndName(account,name);
    }

    @Override
    public student SfindById(String id) {
        return studentjpa.findById(Integer.parseInt(id));
    }

    @Override
    public Page<student> ScourseselectStudent(String courseid,String studentname,Pageable pageable) {
        return studentjpa.ScourseselectStudent(courseid,studentname,pageable);
    }
}

